package com.cr.observer.improve;

public class SinaSit implements Observer{
    private float temperature;
    private float pressure;
    private float humidity;
    // 更新天气
    @Override
    public void update(float temperature, float pressure, float humidity){
        this.temperature=temperature;
        this.pressure=pressure;
        this.humidity=humidity;
        display();
    }
    // 显示天气
    public void display(){
        System.out.println("***新浪 mTemperature: "+temperature+"***");
        System.out.println("***新浪 mPressure: "+pressure+"***");
        System.out.println("***新浪 mHumidity: "+humidity+"***");
    }
}
